#
# Copyright (C) 2004-2007 National Institute of Advanced Industrial
# Science and Technology (AIST), Japan.
# 
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version
# 2 of the License, or (at your option) any later version.
# 
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
# 
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
TARGET		:= pspd
OBJS		:= pspd.o
CFLAGS		:= -g -Wall -I @LIBNL_SRC@/include @DEBUG_COPT@
LIBS		:= -L @LIBNL_SRC@/lib -lnl

INSTALL		:= @INSTALL@
INSTALL_PROGRAM	:= @INSTALL_PROGRAM@
INSTALL_SCRIPT	:= @INSTALL_SCRIPT@
INSTALL_DATA	:= @INSTALL_DATA@

all:	$(TARGET)

$(TARGET):	$(OBJS)
	$(CC) $(LIBS) $(OBJS) -o $@

.c.o:
	$(CC) $(CFLAGS) -c -o $*.o $<

install:	pspd
	test -d $(DESTDIR)/usr/sbin || mkdir -p $(DESTDIR)/usr/sbin
	$(INSTALL_PROGRAM) pspd $(DESTDIR)/usr/sbin

clean:
	-rm -f *~ $(OBJS) $(TARGET)
